
#include <BApplication>

#include "MainWindow.h"

using namespace BWE;

int main(int argc, char** argv)
{
	BApplication app(argc, argv);
	app.setCurrentPath(app.appPath());
	app.setStyleSheet("data/style/style.css");

	BString fileName;
	if (argc > 1)
	{
		fileName = argv[1];
	}

	MainWindow* mw = new MainWindow();
	mw->setTitle("main window");
	mw->setMargin(3);
	mw->show();

	if (fileName.size())
	{
		if (mw->openFile(fileName))
		{
			mw->setName(fileName);
			mw->setTitle(fileName);
		}
	}

	return app.execute();
}

